package com.yhy.wxzn.wcs.service;

import com.yhy.wxzn.wcs.device.rgv.enums.RgvProgress;
import com.yhy.wxzn.wcs.entity.TaskGenerateRequest;
import com.yhy.wxzn.wcs.entity.WcsFourWayTask;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yhy.wxzn.wcs.enums.TaskStatus;
import com.yhy.wxzn.wcs.enums.TaskType;
import org.jeecg.common.api.vo.Result;

import java.util.List;

/**
 * @Description: 四向车任务表
 * @Author: jeecg-boot
 * @Date:   2023-11-08
 * @Version: V1.0
 */
public interface IWcsFourWayTaskService extends IService<WcsFourWayTask> {


    WcsFourWayTask getFirstCanExecuteTask(Integer id);


    List<WcsFourWayTask> getUnAssignTask();

    void assignTask(Integer taskNo, Integer id);


    boolean updateRgvProgress(WcsFourWayTask task, RgvProgress rgvProgress);

    /**查找新建的四向车任务*/
    List<WcsFourWayTask> getUnfinishedByFourWayList();


    boolean updateTaskStatus(WcsFourWayTask task, TaskStatus start);

    /**根据起点终点*/
    void genFourWayTask(String source, String target, TaskType taskType);

    Result<?> generateTask(TaskGenerateRequest taskGenerateRequest);
}
